from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.response import Response
from apps.tags.models import *
from apps.tags.tags_sers import TagSer


# Create your views here.
class Tags(APIView):
    def get(self, request):
        tags = Tag.objects.all()
        ser = TagSer(tags, many=True)
        return Response({'code': 200, 'message': '成功', 'data': ser.data})
